package com.gao.gLotusMusic.view;

import com.gao.gLotusMusic.task.Task;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

public class Main extends Application {
    public static Main app;
    private Stage primaryStage;

    public static Stage getPrimaryStage() {
        return app.primaryStage;
    }



    public void start(Stage stage) {
        app = this;
        this.primaryStage = stage;
        BorderPane root = new BorderPane(CenterUI.instance, TopUi.instance, null, BottomUI.instance, new Button("left"));
        root.setPrefWidth(1000);
        root.setPrefHeight(600);
        Scene scene = new Scene(root);
//        scene.getStylesheets().add(getClass().getClassLoader().getResource("application.css").toExternalForm());

        stage.setTitle("music");
        stage.setScene(scene);
        stage.show();
    }

    @Override
    public void stop() throws Exception {
        super.stop();
        Task.shutdown();
    }

    public void play(String url) {
    }

    public static void main(String[] args) {
        launch();
    }

}
